package com.master.demo.im.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 在线会话信息
 *
 * @author: Sport
 * @date: 2022-06-15
 * @version: 1.0.0
 * Copyright Ⓒ 2021 恒翔 Computer Corporation Limited All rights reserved.
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("im_session")
public class Session implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final transient int STATUS_INACTIVE = 1;
    public static final transient int STATUS_ACTIVE = 0;

    public static final transient String CHANNEL_WXAPP = "wxapp";
    public static final transient String CHANNEL_IOS = "ios";
    public static final transient String CHANNEL_ANDROID = "android";
    public static final transient String CHANNEL_WINDOWS = "windows";
    public static final transient String CHANNEL_MAC = "mac";
    public static final transient String CHANNEL_WEB = "web";


    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 绑定时间
     */
    private Long bindTime;

    /**
     * 用户id
     */
    private String uid;

    /**
     * nettyId
     */
    private String nid;

    /**
     * 域名
     */
    private String host;

    /**
     * 设备类型
     */
    private String channel;

    /**
     * 设备id
     */
    private String deviceId;

    /**
     * 设备名称
     */
    private String deviceName;

    /**
     * 系统版本
     */
    private String osVersion;

    /**
     * app版本
     */
    private String appVersion;

    /**
     * 语言
     */
    private String language;

    /**
     * 当前位置
     */
    private String location;

    /**
     * 纬度
     */
    private Double latitude;

    /**
     * 经度
     */
    private Double longitude;

    /**
     * ios设备是否开启Apns，0：未开启；1：开启
     */
    private Integer isApns;

    /**
     * 状态 0：离线；1：在线
     */
    private Integer status;

}
